home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / tuning / download / xteq / setup.exe / {app} / plugins / XQ IE CleanUp Codepages.xpl < prev    next >
Text File  |  2001-04-06  |  3KB  |  71 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="1"
  4. "UIPATH"="Internet\Internet Explorer\System"
  5. "NAME"="Clean Up Code Page References"
  6. "VERSION"="1.06"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Attempt to improve IE performance by cleaning up codepages"
  9. "DESCRIPTION 1"="When you right-click the mouse in Internet Explorer, the program checks its codepage settings in the Registry. If it finds a blank codepage, then it will try to locate a replacement. Doing this wastes a lot of time and processor cycles, so by removing the empty entries, the process can be speeded up."
  10. "DESCRIPTION 2"="This option lets you hide the blank settings, so IE won't try to find replacement codepages. This may greatly improve IE's performance."
  11. "DESCRIPTION 3"="On some machines your codepages may be correctly configured, in which case, using this option won't offer any improvements in performance. The plug-in will report back how many codepages were removed when the options is activated."
  12. "DESCRIPTION 4"="If using this plug-in actually decreases IE's performance, deactivating the option will restore all entries."
  13. "AUTHOR"="Neil R. Turner (totalxs@hotmail.com) for Xteq Systems"
  14. "CONTACTURL"="http://www.neilrt.cwc.net/"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="Thanks to CptSiskoX [CptSiskoX@FlashMail.com] and Axcel216 [AXCEL216@aol.com] for the idea!"
  17.  
  18. sP="HKLM\System\CurrentControlSet\Control\Nls\Codepage"
  19. sQ="\MIE55SpeedUp"
  20.  
  21. Sub Plugin_Initialize 
  22.  If RegPathExists(sP) then
  23.   If RegPathExists(sP&sQ)=1 then SetUIElement 1,true
  24.  else
  25.   Disable
  26.  end if
  27. End Sub
  28.  
  29. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  30.  f=0
  31.  s=GetUIElement(1)
  32.  if s=true then
  33.   ' We need to enumerate all values, and
  34.   ' if they are blank, get all of their information,
  35.   ' and then create a copy in [sQ]. We then remove
  36.   ' the old values.
  37.   
  38.   ' the following code was taken from XQ IE Outlook Express 7.xpl
  39.   iCount=RegEnumValues(sP)
  40.   For x=1 to iCount
  41.    t=RegEnumElement(x)
  42.    z=RegReadValue(sP & "\" & t)
  43.    if z="" then
  44.     f=f+1
  45.     u=RegValueType(sP & "\" & t)
  46.     v=RegReadValue(sP & "\" & t)
  47.     Call RegWriteValue(sP & sQ & "\" & t,v,u)
  48.     Call RegDeleteValue(sP & "\" & t)
  49.    end if
  50.   Next
  51.   Call MsgInformation("X-Setup found and removed " & f & " invalid codepages.")
  52.  else
  53.   ' we take all values in [sQ] and move them back.
  54.   iCount=RegEnumValues(sP&sQ)
  55.   For x=1 to iCount
  56.    t=RegEnumElement(x)
  57.    z=RegReadValue(sP&sQ & "\" & t)
  58.    u=RegValueType(sP&sQ & "\" & t)
  59.    v=RegReadValue(sP&sQ & "\" & t)
  60.    Call RegWriteValue(sP & "\" & t,v,u)
  61.    Call RegDeleteValue(sP&sQ & "\" & t)
  62.   Next
  63.   if RegPathExists(sP&sQ)=true then
  64.    Call RegDeletePath(sP&sQ)
  65.   end if
  66.  end if
  67. End Sub
  68.  
  69. Sub Plugin_Terminate 
  70. End Sub
  71.